import request from '@/utils/request';
import type { BusinessInfoData, BusinessResponseData} from "@/api/home/type.ts"
enum API{
    BUSINESS_LIST="/Business/listBusiness",
    BUSINESS_INFO="/Business/getBusinessById/",
    BUSINESS_TYPE="/Business/listBusinessByOrderTypeId/"
}
//获取商家信息
export const reqBusInfo=() =>request.get<any,BusinessResponseData>(API.BUSINESS_LIST);
//根据商家ID查询商家
export const reqBusInfoById=(data:number)=>request.get<any,BusinessInfoData>(API.BUSINESS_INFO+data);
//根据分类查询商家
export const reqBusinessByType=(data:number)=>request.get<any,BusinessResponseData>(API.BUSINESS_TYPE+data);